package com.lanyou.esb.cook.proxy.auth.processor;

import java.util.Map;

import com.lanyou.esb.cook.proxy.entity.FieldSystem;
import com.lanyou.esb.cook.proxy.entity.Http;
import com.lanyou.esb.cook.proxy.entity.Token;
import com.lanyou.esb.cook.proxy.exception.AuthException;
import com.lanyou.esb.cook.proxy.meta.AuthType;

/**
 * 验证权限处理接口
 * 
 * @author Davey.wu
 */
public interface VerifyAuthProcessor {
	/**
	 * 获取校验类型
	 * 
	 * @return
	 */
	AuthType getAuthType();

	/**
	 * 校验
	 * 
	 * @param system
	 *            ：领域系统
	 * @param interfaces
	 *            ：接口
	 * @param authInfo
	 *            ：校验信息
	 * @return
	 * @throws AuthException
	 * @throws Exception
	 */
	boolean verify(FieldSystem system, Http interfaces,
			Map<String, Object> authInfo,Token token) throws AuthException, Exception;
}
